<?php

namespace catchAdmin\pc\tables;

use catchAdmin\pc\tables\forms\Factory;
use catcher\CatchTable;
use catcher\library\table\Actions;
use catcher\library\table\HeaderItem;
use catcher\library\table\Search;

class SysVocation extends CatchTable
{

    public function Table()
    {
        return $this->getTable('sysVocation')
            ->header([
                HeaderItem::label('上级行业')->prop('parent_vocation_name')->width('350'),
                HeaderItem::label('行业')->prop('vocation_name'),
            ])
            ->withSearch([
                Search::label('上级行业')->text('parent_vocation_name', '上级行业')->clearable(true),
                Search::label('行业')->text('vocation_name', '行业')->clearable(true),
            ])
            ->selectionChange()
            ->withApiRoute('sysVocation')
            ->withActions([
//                Actions::create(),
//                Actions::export(),
            ])
            ->render();
    }


    public function form()
    {
        return Factory::create('sysVocation');
    }

}
